var globalConfig = {
  // host: "",
  //api: "http://localhost:8999/rest/api",
  //api: "/rest/api",
  systemTitle: "宁波动态位置大数据服务平台",
  basemap: {
    /*
    type：请修改为custom
    vector：矢量底图url地址
    imagery：影像底图url地址
    */
    type: "online",
    vector: "http://10.96.14.208/tjch_sqjc_wmts01/rest/services/gaode_vector/MapServer/tile/{z}/{y}/{x}",
    imagery: "http://10.96.14.208/tjch_sqjc_wmts01/rest/services/google_image/MapServer/tile/{z}/{y}/{x}"
    //vector: "http://webrd{s}.is.autonavi.com/appmaptile?size=1&scale=1&style=8&lang=zh_cn&x={x}&y={y}&z={z}",
    //imagery: "http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&scale=2"
  },

  configJson: {
    pt: {
      "dataUid": "",
      "dataType": "public",
      "interactivity": [],
      "vizConfig": {
        "type": "marker-simple",
        "labelField": null,
        "labelColor": "#000000",
        "labelFont": "Microsoft YaHei Regular",
        "labelSize": 12,
        "labelDx": 0,
        "labelDy": -20,
        "labelHaloColor": "#fff",
        "labelAllowOverlap": true,
        "labelPlacement": "point",
        "blendingMode": "src-over",
        "markerColor": "#4087F7",
        "markerOpacity": 0.8,
        "markerSize": 6,
        "outlineColor": "#ffffff",
        "outlineOpacity": 0.8,
        "outlineWidth": 1
      }
    },
    pl: {
      "dataUid": "",
      "dataType": "public",
      "vizConfig": {
        "type": "polyline-simple",
        "labelField": null,
        "labelColor": "#000000",
        "labelFont": "Microsoft YaHei Regular",
        "labelSize": 12,
        "labelDx": 0,
        "labelDy": 0,
        "labelHaloColor": "#fff",
        "labelAllowOverlap": false,
        "labelPlacement": "point",
        "blendingMode": "src-over",
        "lineColor": "#0070c0",
        "lineOpacity": 0.8,
        "lineWidth": 1
      }
    },
    pg: {
      "dataUid": "",
      "dataType": "public",
      "interactivity": [],
      "vizConfig": {
        "type": "polygon-simple",
        "labelField": null,
        "labelColor": "#000000",
        "labelFont": "Microsoft YaHei Regular",
        "labelSize": 12,
        "labelDx": 0,
        "labelDy": 0,
        "labelHaloColor": "#fff",
        "labelAllowOverlap": false,
        "labelPlacement": "point",
        "blendingMode": "src-over",
        "fillColor": "#7030a0",
        "fillOpacity": 0.8,
        "outlineColor": "#ffffff",
        "outlineOpacity": 0.8,
        "outlineWidth": 1
      }
    }
  },
  init() {
    document.title = this.systemTitle;
    let hostname = window.location.hostname;
    let port = window.location.port
    if (hostname == 'localhost') {
      //globalConfig.host = 'http://localhost:9600';
      //globalConfig.api = '/rest/api';
      globalConfig.host = `http://${hostname}`;
      globalConfig.data_show_host = 'http://localhost:8082';
      globalConfig.api = `http://${hostname}/rest/api`;
      //globalConfig.basemap.type = 'google';
      globalConfig.basemap.type = 'tianditu';
      globalConfig.basemap.vector = '';
      globalConfig.basemap.imagery = '';
    } else {
      globalConfig.host = '';
      globalConfig.api = '/rest/api';
      globalConfig.data_show_host = `http://${hostname}:${port}/ningbo_datashow/#/map`;
      //globalConfig.basemap.type = 'google';
      globalConfig.basemap.type = 'tianditu';
      globalConfig.basemap.vector = '';
      globalConfig.basemap.imagery = '';
    }
  }
};
globalConfig.init();


let config = {}
Object.assign(config, globalConfig)
export default config
